package com.example.echoewish.repository.network;

import com.example.echoewish.repository.network.service.CollectionService;
import com.example.echoewish.util.ServiceCreator;

import retrofit2.Callback;

public class CollectionServiceNetwork {

    public static void collectPost(int postId, int userId, Callback callback)
    {
        CollectionService collectionService=new ServiceCreator().create(CollectionService.class);
        collectionService.collectPost(postId,userId).enqueue(callback);
    }

    public static void cancelCollection(int postId, int userId, Callback callback)
    {
        CollectionService collectionService=new ServiceCreator().create(CollectionService.class);
        collectionService.cancelCollection(postId,userId).enqueue(callback);
    }

    public static void queryIsCollect(int postId, int userId, Callback callback)
    {
        CollectionService collectionService=new ServiceCreator().create(CollectionService.class);
        collectionService.queryIsCollect(postId,userId).enqueue(callback);
    }
}
